package com.cofi.vueelementadminserver.entity.system;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName stm_user
 */
@TableName(value ="stm_user")
@Data
public class StmUser implements Serializable {
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
    /**
     * 主键
     */
    @TableId
    private String userId;
    /**
     * 登录名称
     */
    private String logName;
    /**
     * 密码
     */
    private String pwd;
    /**
     * 用户登录名称
     */
    private String userName;

    /**
     * 用户名
     */
    private String nickName;

    /**
     * 性别
     */
    private Boolean male;
    /**
     * 组织主键
     */
    private String organizeId;
    /**
     * 职位
     */
    private String postId;
    /**
     * 部门负责人标识
     */
    private Boolean departmentCleaderFlag;
    /**
     * 排序
     */
    private Integer sort;
    /**
     * 手机
     */
    private String userPhone;
    /**
     * 办公电话
     */
    private String userOfficeTel;
    /**
     * 生日
     */
    private Date birthday;
    /**
     * 是否启用
     */
    private Integer enabledFlag;
    /**
     * 创建用户主键
     */
    private String createUserId;
    /**
     * 创建用户
     */
    private String createUserName;
    /**
     * 最忌你修改用户主键
     */
    private String lastModifyUserId;
    /**
     * 最近更新时间
     */
    private Date lastModifyTime;
    /**
     * 删除标识
     */
    private Integer isDeleted;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        StmUser other = (StmUser) that;
        return (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getLogName() == null ? other.getLogName() == null : this.getLogName().equals(other.getLogName()))
            && (this.getPwd() == null ? other.getPwd() == null : this.getPwd().equals(other.getPwd()))
            && (this.getUserName() == null ? other.getUserName() == null : this.getUserName().equals(other.getUserName()))
            && (this.getMale() == null ? other.getMale() == null : this.getMale().equals(other.getMale()))
            && (this.getOrganizeId() == null ? other.getOrganizeId() == null : this.getOrganizeId().equals(other.getOrganizeId()))
            && (this.getPostId() == null ? other.getPostId() == null : this.getPostId().equals(other.getPostId()))
            && (this.getDepartmentCleaderFlag() == null ? other.getDepartmentCleaderFlag() == null : this.getDepartmentCleaderFlag().equals(other.getDepartmentCleaderFlag()))
            && (this.getSort() == null ? other.getSort() == null : this.getSort().equals(other.getSort()))
            && (this.getUserPhone() == null ? other.getUserPhone() == null : this.getUserPhone().equals(other.getUserPhone()))
            && (this.getUserOfficeTel() == null ? other.getUserOfficeTel() == null : this.getUserOfficeTel().equals(other.getUserOfficeTel()))
            && (this.getBirthday() == null ? other.getBirthday() == null : this.getBirthday().equals(other.getBirthday()))
            && (this.getEnabledFlag() == null ? other.getEnabledFlag() == null : this.getEnabledFlag().equals(other.getEnabledFlag()))
            && (this.getCreateUserId() == null ? other.getCreateUserId() == null : this.getCreateUserId().equals(other.getCreateUserId()))
            && (this.getCreateUserName() == null ? other.getCreateUserName() == null : this.getCreateUserName().equals(other.getCreateUserName()))
            && (this.getLastModifyUserId() == null ? other.getLastModifyUserId() == null : this.getLastModifyUserId().equals(other.getLastModifyUserId()))
            && (this.getLastModifyTime() == null ? other.getLastModifyTime() == null : this.getLastModifyTime().equals(other.getLastModifyTime()))
            && (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getLogName() == null) ? 0 : getLogName().hashCode());
        result = prime * result + ((getPwd() == null) ? 0 : getPwd().hashCode());
        result = prime * result + ((getUserName() == null) ? 0 : getUserName().hashCode());
        result = prime * result + ((getMale() == null) ? 0 : getMale().hashCode());
        result = prime * result + ((getOrganizeId() == null) ? 0 : getOrganizeId().hashCode());
        result = prime * result + ((getPostId() == null) ? 0 : getPostId().hashCode());
        result = prime * result + ((getDepartmentCleaderFlag() == null) ? 0 : getDepartmentCleaderFlag().hashCode());
        result = prime * result + ((getSort() == null) ? 0 : getSort().hashCode());
        result = prime * result + ((getUserPhone() == null) ? 0 : getUserPhone().hashCode());
        result = prime * result + ((getUserOfficeTel() == null) ? 0 : getUserOfficeTel().hashCode());
        result = prime * result + ((getBirthday() == null) ? 0 : getBirthday().hashCode());
        result = prime * result + ((getEnabledFlag() == null) ? 0 : getEnabledFlag().hashCode());
        result = prime * result + ((getCreateUserId() == null) ? 0 : getCreateUserId().hashCode());
        result = prime * result + ((getCreateUserName() == null) ? 0 : getCreateUserName().hashCode());
        result = prime * result + ((getLastModifyUserId() == null) ? 0 : getLastModifyUserId().hashCode());
        result = prime * result + ((getLastModifyTime() == null) ? 0 : getLastModifyTime().hashCode());
        result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", userId=").append(userId);
        sb.append(", logName=").append(logName);
        sb.append(", pwd=").append(pwd);
        sb.append(", userName=").append(userName);
        sb.append(", male=").append(male);
        sb.append(", organizeId=").append(organizeId);
        sb.append(", postId=").append(postId);
        sb.append(", departmentCleaderFlag=").append(departmentCleaderFlag);
        sb.append(", sort=").append(sort);
        sb.append(", userPhone=").append(userPhone);
        sb.append(", userOfficeTel=").append(userOfficeTel);
        sb.append(", birthday=").append(birthday);
        sb.append(", enabledFlag=").append(enabledFlag);
        sb.append(", createUserId=").append(createUserId);
        sb.append(", createUserName=").append(createUserName);
        sb.append(", lastModifyUserId=").append(lastModifyUserId);
        sb.append(", lastModifyTime=").append(lastModifyTime);
        sb.append(", isDeleted=").append(isDeleted);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}